$(function () {
    window.onload = function () {
        $.ajax({
            url: 'http://localhost:3000/report/new',
            method: 'get',
            success: function (res) {
                var sdd = [];
                var str = '';
                for (var i = 0; i < 8; i++) {
                    sdd.push(res[i])
                }
                $.each(sdd, function (index, item) {
                    // console.log(item);
                    str += "<li>" +
                        "<img src=" + item.img + ">" +
                        "<div class=report>" +
                        "<div class=wen>" + item.text + "</div>" +
                        "<div class=comment>苏苏 2016-01-25 " +
                        "<span><img src=../img/css-img/img/zan.png>3&nbsp;&nbsp;&nbsp;<img src=../img/css-img/img/xin.png> 3</span>" +
                        "</div>" +
                        "</div>" +
                        "</li>" +
                        "<div>关于格林威特空气净化器还有 4 篇报告，点击查看</div>"
                })
                $('.zuobian').html(str);
            }
        })
        $('.content-box5').click(function(){
            $('.both-box').css('height','3200px');
            $('.text').css('height','3100px');
            $('.zuobian').css('height','3100px');
            $('.content-box5').hide();
        })
    }
})
